<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box1{
            width: 100px;
            height: 100px;
            background: yellow;
            border: 10px solid red;
            /*样式：solid double dashed dotted*/
                /* 实线   双线   线段   点线 */
            /*背景色也能蔓延到边框*/
        }
        .box2{
            width: 100px;
            height: 100px;
            background: blue;
            border-top: 5px solid red;
            border-left: 10px dashed yellow;
        }
        .box3{
            width: 100px;
            height: 100px;
            background: green;
            border-width: 10px 20px 30px 40px;
            border-color: yellow blue black red;
            border-style: solid; /*可多显示*/
/* 
            border-width
            border-style
            border-color */
        }
    </style>
</head>
<body>
    <div class="box1"></div>
    <div class="box2"></div>
    <div class="box3"></div>
</body>
</html>